package com.bm.server.controller;

import com.bm.common.dto.FriendsDto;
import com.bm.common.vo.R;
import com.bm.server.service.intf.FriendsService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * .=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
 * |                     ______                     |
 * |                  .-"      "-.                  |
 * |                 /            \                 |
 * |     _          |              |          _     |
 * |    ( \         |,  .-.  .-.  ,|         / )    |
 * |     > "=._     | )(__/  \__)( |     _.=" <     |
 * |    (_/"=._"=._ |/     /\     \| _.="_.="\_)    |
 * |           "=._"(_     ^^     _)"_.="           |
 * |               "=\__|IIIIII|__/="               |
 * |              _.="| \IIIIII/ |"=._              |
 * |    _     _.="_.="\          /"=._"=._     _    |
 * |   ( \_.="_.="     `--------`     "=._"=._/ )   |
 * |    > _.="                            "=._ <    |
 * |   (_/                                    \_)   |
 * |                                                |
 * '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='
 * -----------------代码的搬运工-----------------
 *
 * @Date: 2022/07/22/16:16
 */
@RestController
@RequestMapping("/server/friends/")
public class FriendsController {
    @Resource
    private FriendsService service;
    @PostMapping("save.do")
    public R save(@RequestBody FriendsDto dto){
        return service.save(dto);
    }
    @GetMapping("selectFriends.do")
    public R select(){
        return service.selectFriends();
    }
    @GetMapping("dianzan.do")
    public R update(int id){
        return service.updateId(id);
    }
}
